package mypro1;

public class Testwhileandfor2 {
    public static void main(String[] args) {
        int largesum = 0;
        for (int b = 1; b <= 100; b++) {
            int smallsum = 0;
            for (int a = 0; a <= b; a++) {
                smallsum = smallsum + a;
            }

            System.out.println("smallsum of " + b + " " + smallsum);
            largesum = largesum + smallsum;
        }
        System.out.println(largesum);

        int sum = 0;

        for (int i = 1; i <= 100; i++) {
            int sumSigema = 0;
            for (int n = 1; n <= i; n++) {
                sumSigema += n;
            }
            sum += sumSigema;
        }
        System.out.println("sum is " + sum);

    }
}
